package com.charger.giftcert.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.charger.giftcert.mapper.GiftcertificateMapper;
import com.charger.giftcert.domain.Giftcertificate;
import com.charger.giftcert.service.IGiftcertificateService;

/**
 * 礼券管理Service业务层处理
 * 
 * @author Lilysi
 * @date 2024-11-23
 */
@Service
public class GiftcertificateServiceImpl implements IGiftcertificateService 
{
    @Autowired
    private GiftcertificateMapper giftcertificateMapper;

    /**
     * 查询礼券管理
     * 
     * @param id 礼券管理主键
     * @return 礼券管理
     */
    @Override
    public Giftcertificate selectGiftcertificateById(Long id)
    {
        return giftcertificateMapper.selectGiftcertificateById(id);
    }

    /**
     * 查询礼券管理列表
     * 
     * @param giftcertificate 礼券管理
     * @return 礼券管理
     */
    @Override
    public List<Giftcertificate> selectGiftcertificateList(Giftcertificate giftcertificate)
    {
        return giftcertificateMapper.selectGiftcertificateList(giftcertificate);
    }

    /**
     * 新增礼券管理
     * 
     * @param giftcertificate 礼券管理
     * @return 结果
     */
    @Override
    public int insertGiftcertificate(Giftcertificate giftcertificate)
    {
        return giftcertificateMapper.insertGiftcertificate(giftcertificate);
    }

    /**
     * 修改礼券管理
     * 
     * @param giftcertificate 礼券管理
     * @return 结果
     */
    @Override
    public int updateGiftcertificate(Giftcertificate giftcertificate)
    {
        return giftcertificateMapper.updateGiftcertificate(giftcertificate);
    }

    /**
     * 批量删除礼券管理
     * 
     * @param ids 需要删除的礼券管理主键
     * @return 结果
     */
    @Override
    public int deleteGiftcertificateByIds(Long[] ids)
    {
        return giftcertificateMapper.deleteGiftcertificateByIds(ids);
    }

    /**
     * 删除礼券管理信息
     * 
     * @param id 礼券管理主键
     * @return 结果
     */
    @Override
    public int deleteGiftcertificateById(Long id)
    {
        return giftcertificateMapper.deleteGiftcertificateById(id);
    }
}
